package cn.zwx.zookeeper.config.example.zexamples;

import cn.zwx.zookeeper.config.example.annotations.ZkRefreshScope;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * @author zhangwenxue
 */
@RestController
@ZkRefreshScope
public class TestController {

    @Value("${member.name:123}")
    private String userName;


    @RequestMapping("/")
    public HashMap<Object, Object> getUserName(){
        HashMap<Object, Object> objectObjectHashMap = new HashMap<>(4);
        objectObjectHashMap.put("userName",userName);
        return objectObjectHashMap;

    }
}
